package com.job.meituan;

import java.util.Scanner;

/**
 * @ClassName: test.Meituan4
 * @Description:
 * @Author: 12071
 * @Date: 2022/4/9 16:55
 */
public class Meituan0409_4 {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n =sc.nextInt();
        if(n<=1) {
            System.out.println(0);
            return;
        }
        int tmp1= n*(n-1)*(n-1)*(n-1);
        int tmp2 = n*(n-1)*(n-2)*(n-2);
        int tmp3 = tmp1+tmp2;
        System.out.println(tmp3);

    }
}
